log using "$Rep_smokelabor/2_analysis/output_logs/appendix_table2.log", replace 

	use "$Rep_smokelabor/1_build/regdata/county_quarter.dta", clear 
	
	local tbl_settings_log format(%6.3f) parentheses(stderr) asterisk()
	local tbl_settings_pmil format(%6.1f) parentheses(stderr) asterisk()
	
	** panel a 
	if 1 {
		
		* income 
		ivreghdfe d_pc_qwi_payroll (pm25=hms_dens) [aw=seer_pop], a(fe_countyqtroy fe_styr) cluster(countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_a.dta", addlabel(KleibergenPaap_F, `e(rkf)') table(earnings, `tbl_settings_log') replace
		
		* emp 
		ivreghdfe d_pmil_qwi_emptotal (pm25=hms_dens) [aw=seer_pop16plus], a(fe_countyqtroy fe_styr) cluster(countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_a.dta", table(employment, `tbl_settings_pmil') append
		
		* lfp
		ivreghdfe d_pmil_lau_lfp (pm25=hms_dens) [aw=seer_pop] , a(fe_countyqtroy fe_styr) cluster(countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_a.dta", table(lfp, `tbl_settings_pmil') append
		
		preserve 
			use "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_a.dta", clear
			drop if var == "r2"
			drop if var == "_id"
			drop if strpos(var, "_cons_") > 0
			replace var="observations" if var=="N"
			ingap 2
			ingap 5
			list , sep(0)
			saveold "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_a.dta", replace
		restore 
		
	}
	
	** panel b, first row
	if 1 {
		
		* income 
		ivreghdfe d_pc_qwi_payroll g*_tavg g*_wdir (pm25=hms_deep) [aw=seer_pop], a(g_ppt g_wspd fe_countyqtroy fe_styr) cluster(countyfip fe_stqtros)
		regsave pm25 using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_b1.dta", addlabel(KleibergenPaap_F, `e(rkf)') table(earnings, `tbl_settings_log') replace
		
		* emp 
		ivreghdfe d_pmil_qwi_emptotal g*_tavg g*_wdir (pm25=hms_deep) [aw=seer_pop16plus], a(g_ppt g_wspd fe_countyqtroy fe_styr) cluster(countyfip fe_stqtros)
		regsave pm25 using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_b1.dta", table(employment, `tbl_settings_pmil') append
		
		* lfp
		ivreghdfe d_pmil_lau_lfp g*_tavg g*_wdir (pm25=hms_deep) [aw=seer_pop] , a(g_ppt g_wspd fe_countyqtroy fe_styr) cluster(countyfip fe_stqtros)
		regsave pm25 using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_b1.dta", table(lfp, `tbl_settings_pmil') append
		
		preserve 
			use "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_b1.dta", clear
			drop if var == "r2"
			drop if var == "_id"
			drop if strpos(var, "_cons_") > 0
			replace var="observations" if var=="N"
			ingap 2
			ingap 5
			list , sep(0)
			saveold "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_b1.dta", replace
		restore 
			
	}
	
	** panel b, second row
	if 1 {
		
		* income 
		ivreghdfe d_pc_qwi_payroll (pm25=hms_deep) [aw=seer_pop], a(c.g1_wdir##i.statefip c.g2_wdir##i.statefip c.g3_wdir##i.statefip c.g4_wdir##i.statefip c.g5_wdir##i.statefip c.g6_wdir##i.statefip fe_countyqtroy fe_styr) cluster(countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_b2.dta", addlabel(KleibergenPaap_F, `e(rkf)') table(earnings, `tbl_settings_log') replace
		
		* emp 
		ivreghdfe d_pmil_qwi_emptotal (pm25=hms_deep) [aw=seer_pop16plus], a(c.g1_wdir##i.statefip c.g2_wdir##i.statefip c.g3_wdir##i.statefip c.g4_wdir##i.statefip c.g5_wdir##i.statefip c.g6_wdir##i.statefip fe_countyqtroy fe_styr) cluster(countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_b2.dta", table(employment, `tbl_settings_pmil') append
		
		* lfp
		ivreghdfe d_pmil_lau_lfp (pm25=hms_deep) [aw=seer_pop] , a(c.g1_wdir##i.statefip c.g2_wdir##i.statefip c.g3_wdir##i.statefip c.g4_wdir##i.statefip c.g5_wdir##i.statefip c.g6_wdir##i.statefip fe_countyqtroy fe_styr) cluster(countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_b2.dta", table(lfp, `tbl_settings_pmil') append
		
		preserve 
			use "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_b2.dta", clear
			drop if var == "r2"
			drop if var == "_id"
			drop if strpos(var, "_cons_") > 0
			replace var="observations" if var=="N"
			ingap 2
			ingap 5
			list , sep(0)
			saveold "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_b2.dta", replace
		restore 
			
	}
	
	** panel b, third row 
	if 1 {
		
		* income 
		ivreghdfe d_pc_qwi_payroll (pm25=hms_deep) [aw=seer_pop], a(c.g1_wdir##i.countyfip c.g2_wdir##i.countyfip c.g3_wdir##i.countyfip c.g4_wdir##i.countyfip c.g5_wdir##i.countyfip c.g6_wdir##i.countyfip fe_countyqtroy fe_styr) cluster(countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_b3.dta", addlabel(KleibergenPaap_F, `e(rkf)') table(earnings, `tbl_settings_log') replace
		
		* emp 
		ivreghdfe d_pmil_qwi_emptotal (pm25=hms_deep) [aw=seer_pop16plus], a(c.g1_wdir##i.countyfip c.g2_wdir##i.countyfip c.g3_wdir##i.countyfip c.g4_wdir##i.countyfip c.g5_wdir##i.countyfip c.g6_wdir##i.countyfip fe_countyqtroy fe_styr) cluster(countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_b3.dta", table(employment, `tbl_settings_pmil') append
		
		* lfp
		ivreghdfe d_pmil_lau_lfp (pm25=hms_deep) [aw=seer_pop] , a(c.g1_wdir##i.countyfip c.g2_wdir##i.countyfip c.g3_wdir##i.countyfip c.g4_wdir##i.countyfip c.g5_wdir##i.countyfip c.g6_wdir##i.countyfip fe_countyqtroy fe_styr) cluster(countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_b3.dta", table(lfp, `tbl_settings_pmil') append
		
		preserve 
			use "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_b3.dta", clear
			drop if var == "r2"
			drop if var == "_id"
			drop if strpos(var, "_cons_") > 0
			replace var="observations" if var=="N"
			ingap 2
			ingap 5
			list , sep(0)
			saveold "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_b3.dta", replace
		restore 
			
	}
	
	** panel c, first row 
	if 1 {
		
		* income 
		ivreghdfe d_pc_qwi_payroll (pm25=hms_deep) [aw=seer_pop], a(fe_countyqtroy fe_styr) cluster(countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_c1.dta", addlabel(KleibergenPaap_F, `e(rkf)') table(earnings, `tbl_settings_log') replace
		
		* emp 
		ivreghdfe d_pmil_qwi_emptotal (pm25=hms_deep) [aw=seer_pop16plus], a(fe_countyqtroy fe_styr) cluster(countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_c1.dta", table(employment, `tbl_settings_pmil') append
		
		* lfp
		ivreghdfe d_pmil_lau_lfp (pm25=hms_deep) [aw=seer_pop] , a(fe_countyqtroy fe_styr) cluster(countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_c1.dta", table(lfp, `tbl_settings_pmil') append
		
		preserve 
			use "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_c1.dta", clear
			drop if var == "r2"
			drop if var == "_id"
			drop if strpos(var, "_cons_") > 0
			replace var="observations" if var=="N"
			ingap 2
			ingap 5
			list , sep(0)
			saveold "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_c1.dta", replace
		restore 
				
	}
	
	** panel c, second row 
	if 1 {
		
		* income 
		ivreghdfe d_pc_qwi_payroll (pm25=hms_deep) [aw=seer_pop], a(fe_countyqtroy fe_divisionyr) cluster(countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_c2.dta", addlabel(KleibergenPaap_F, `e(rkf)') table(earnings, `tbl_settings_log') replace
		
		* emp 
		ivreghdfe d_pmil_qwi_emptotal (pm25=hms_deep) [aw=seer_pop16plus], a(fe_countyqtroy fe_divisionyr) cluster(countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_c2.dta", table(employment, `tbl_settings_pmil') append
		
		* lfp
		ivreghdfe d_pmil_lau_lfp (pm25=hms_deep) [aw=seer_pop] , a(fe_countyqtroy fe_divisionyr) cluster(countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_c2.dta", table(lfp, `tbl_settings_pmil') append
		
		preserve 
			use "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_c2.dta", clear
			drop if var == "r2"
			drop if var == "_id"
			drop if strpos(var, "_cons_") > 0
			replace var="observations" if var=="N"
			ingap 2
			ingap 5
			list , sep(0)
			saveold "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_c2.dta", replace
		restore 
		
	}
	
	** panel c, third row 
	if 1 {
		
		* income 
		ivreghdfe d_pc_qwi_payroll (pm25=hms_deep) [aw=seer_pop], a(fe_countyqtroy fe_regionyr) cluster(countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_c3.dta", addlabel(KleibergenPaap_F, `e(rkf)') table(earnings, `tbl_settings_log') replace
		
		* emp 
		ivreghdfe d_pmil_qwi_emptotal (pm25=hms_deep) [aw=seer_pop16plus], a(fe_countyqtroy fe_regionyr) cluster(countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_c3.dta", table(employment, `tbl_settings_pmil') append
		
		* lfp
		ivreghdfe d_pmil_lau_lfp (pm25=hms_deep) [aw=seer_pop] , a(fe_countyqtroy fe_regionyr) cluster(countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_c3.dta", table(lfp, `tbl_settings_pmil') append
		
		preserve 
			use "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_c3.dta", clear
			drop if var == "r2"
			drop if var == "_id"
			drop if strpos(var, "_cons_") > 0
			replace var="observations" if var=="N"
			ingap 2
			ingap 5
			list , sep(0)
			saveold "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_c3.dta", replace
		restore 
		
	}
	
	** panel c, fourth row 
	if 1 {
		
		* income 
		ivreghdfe d_pc_qwi_payroll (pm25=hms_deep) [aw=seer_pop], a(fe_countyqtroy rfrnc_yr) cluster(countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_c4.dta", addlabel(KleibergenPaap_F, `e(rkf)') table(earnings, `tbl_settings_log') replace
		
		* emp 
		ivreghdfe d_pmil_qwi_emptotal (pm25=hms_deep) [aw=seer_pop16plus], a(fe_countyqtroy rfrnc_yr) cluster(countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_c4.dta", table(employment, `tbl_settings_pmil') append
		
		* lfp
		ivreghdfe d_pmil_lau_lfp (pm25=hms_deep) [aw=seer_pop] , a(fe_countyqtroy rfrnc_yr) cluster(countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_c4.dta", table(lfp, `tbl_settings_pmil') append
		
		preserve 
			use "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_c4.dta", clear
			drop if var == "r2"
			drop if var == "_id"
			drop if strpos(var, "_cons_") > 0
			replace var="observations" if var=="N"
			ingap 2
			ingap 5
			list , sep(0)
			saveold "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_c4.dta", replace
		restore 
		
	}
	
	use "$Rep_smokelabor/1_build/regdata/county_year.dta", clear 
	
	local tbl_settings_log format(%6.3f) parentheses(stderr) asterisk()
	local tbl_settings_pmil format(%6.1f) parentheses(stderr) asterisk()
	
	** panel d, first row 
	if 1 {
		
		* income 
		ivreghdfe d_pc_qwi_payroll (pm25=hms_deep) [aw=seer_pop], a(countyfip fe_styr) cluster(countyfip)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_d1.dta", addlabel(KleibergenPaap_F, `e(rkf)') table(earnings, `tbl_settings_log') replace
		
		* emp 
		ivreghdfe d_pmil_qwi_emptotal (pm25=hms_deep) [aw=seer_pop16plus], a(countyfip fe_styr) cluster(countyfip)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_d1.dta", table(employment, `tbl_settings_pmil') append
		
		* lfp
		ivreghdfe d_pmil_lau_lfp (pm25=hms_deep) [aw=seer_pop] , a(countyfip fe_styr) cluster(countyfip)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_d1.dta", table(lfp, `tbl_settings_pmil') append
		
		preserve 
			use "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_d1.dta", clear
			drop if var == "r2"
			drop if var == "_id"
			drop if strpos(var, "_cons_") > 0
			replace var="observations" if var=="N"
			ingap 2
			ingap 5
			list , sep(0)
			saveold "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_d1.dta", replace
		restore 
				
	}
	
	** panel d, second row 
	if 1 {
		
		* income 
		ivreghdfe d_pc_qwi_payroll (pm25=hms_deep) [aw=seer_pop], a(countyfip fe_divisionyr) cluster(countyfip)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_d2.dta", addlabel(KleibergenPaap_F, `e(rkf)') table(earnings, `tbl_settings_log') replace
		
		* emp 
		ivreghdfe d_pmil_qwi_emptotal (pm25=hms_deep) [aw=seer_pop16plus], a(countyfip fe_divisionyr) cluster(countyfip)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_d2.dta", table(employment, `tbl_settings_pmil') append
		
		* lfp
		ivreghdfe d_pmil_lau_lfp (pm25=hms_deep) [aw=seer_pop] , a(countyfip fe_divisionyr) cluster(countyfip)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_d2.dta", table(lfp, `tbl_settings_pmil') append
		
		preserve 
			use "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_d2.dta", clear
			drop if var == "r2"
			drop if var == "_id"
			drop if strpos(var, "_cons_") > 0
			replace var="observations" if var=="N"
			ingap 2
			ingap 5
			list , sep(0)
			saveold "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_d2.dta", replace
		restore 
		
	}
	
	** panel d, third row 
	if 1 {
		
		* income 
		ivreghdfe d_pc_qwi_payroll (pm25=hms_deep) [aw=seer_pop], a(countyfip fe_regionyr) cluster(countyfip)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_d3.dta", addlabel(KleibergenPaap_F, `e(rkf)') table(earnings, `tbl_settings_log') replace
		
		* emp 
		ivreghdfe d_pmil_qwi_emptotal (pm25=hms_deep) [aw=seer_pop16plus], a(countyfip fe_regionyr) cluster(countyfip)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_d3.dta", table(employment, `tbl_settings_pmil') append
		
		* lfp
		ivreghdfe d_pmil_lau_lfp (pm25=hms_deep) [aw=seer_pop] , a(countyfip fe_regionyr) cluster(countyfip)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_d3.dta", table(lfp, `tbl_settings_pmil') append
		
		preserve 
			use "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_d3.dta", clear
			drop if var == "r2"
			drop if var == "_id"
			drop if strpos(var, "_cons_") > 0
			replace var="observations" if var=="N"
			ingap 2
			ingap 5
			list , sep(0)
			saveold "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_d3.dta", replace
		restore 
		
	}
	
	** panel d, fourth row 
	if 1 {
		
		* income 
		ivreghdfe d_pc_qwi_payroll (pm25=hms_deep) [aw=seer_pop], a(countyfip rfrnc_yr) cluster(countyfip)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_d4.dta", addlabel(KleibergenPaap_F, `e(rkf)') table(earnings, `tbl_settings_log') replace
		
		* emp 
		ivreghdfe d_pmil_qwi_emptotal (pm25=hms_deep) [aw=seer_pop16plus], a(countyfip rfrnc_yr) cluster(countyfip)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_d4.dta", table(employment, `tbl_settings_pmil') append
		
		* lfp
		ivreghdfe d_pmil_lau_lfp (pm25=hms_deep) [aw=seer_pop] , a(countyfip rfrnc_yr) cluster(countyfip)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_d4.dta", table(lfp, `tbl_settings_pmil') append
		
		preserve 
			use "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_d4.dta", clear
			drop if var == "r2"
			drop if var == "_id"
			drop if strpos(var, "_cons_") > 0
			replace var="observations" if var=="N"
			ingap 2
			ingap 5
			list , sep(0)
			saveold "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_d4.dta", replace
		restore 
		
		
	}
	
	use "$Rep_smokelabor/1_build/regdata/county_quarter.dta", clear 
	
	local tbl_settings_log format(%6.3f) parentheses(stderr) asterisk()
	local tbl_settings_pmil format(%6.1f) parentheses(stderr) asterisk()
	
	** panel e, first row 
	if 1 {
		
		* income 
		ivreghdfe pc_qwi_payroll (pm25=hms_deep) [aw=seer_pop], a(fe_countyqtroy fe_styr i.fe_countyqtroy##c.rfrnc_yr) cluster(countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_e1.dta", addlabel(KleibergenPaap_F, `e(rkf)') table(earnings, `tbl_settings_log') replace
		
		* emp 
		ivreghdfe pmil_qwi_emptotal (pm25=hms_deep) [aw=seer_pop16plus], a(fe_countyqtroy fe_styr i.fe_countyqtroy##c.rfrnc_yr) cluster(countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_e1.dta", table(employment, `tbl_settings_pmil') append
		
		* lfp
		ivreghdfe pmil_lau_lfp (pm25=hms_deep) [aw=seer_pop] , a(fe_countyqtroy fe_styr i.fe_countyqtroy##c.rfrnc_yr) cluster(countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_e1.dta", table(lfp, `tbl_settings_pmil') append
		
		preserve 
			use "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_e1.dta", clear
			drop if var == "r2"
			drop if var == "_id"
			drop if strpos(var, "_cons_") > 0
			replace var="observations" if var=="N"
			ingap 2
			ingap 5
			list , sep(0)
			saveold "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_e1.dta", replace
		restore 
		
	}
	
	** panel e, second row 
	if 1 {
		
		* income 
		ivreghdfe pc_qwi_payroll (pm25=hms_deep) [aw=seer_pop], a(fe_countyqtroy fe_styr) cluster(countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_e2.dta", addlabel(KleibergenPaap_F, `e(rkf)') table(earnings, `tbl_settings_log') replace
		
		* emp 
		ivreghdfe pmil_qwi_emptotal (pm25=hms_deep) [aw=seer_pop16plus], a(fe_countyqtroy fe_styr) cluster(countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_e2.dta", table(employment, `tbl_settings_pmil') append
		
		* lfp
		ivreghdfe pmil_lau_lfp (pm25=hms_deep) [aw=seer_pop] , a(fe_countyqtroy fe_styr) cluster(countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_e2.dta", table(lfp, `tbl_settings_pmil') append
		
		preserve 
			use "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_e2.dta", clear
			drop if var == "r2"
			drop if var == "_id"
			drop if strpos(var, "_cons_") > 0
			replace var="observations" if var=="N"
			ingap 2
			ingap 5
			list , sep(0)
			saveold "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_e2.dta", replace
		restore 
		
	}
	
	** panel e, third row 
	if 1 {
		
		* income 
		ivreghdfe d_pc_qwi_payroll (d_pm25=d_hms_deep) [aw=seer_pop], a(fe_countyqtroy fe_styr) cluster(countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_e3.dta", addlabel(KleibergenPaap_F, `e(rkf)') table(earnings, `tbl_settings_log') replace
		
		* emp 
		ivreghdfe d_pmil_qwi_emptotal (d_pm25=d_hms_deep) [aw=seer_pop16plus], a(fe_countyqtroy fe_styr) cluster(countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_e3.dta", table(employment, `tbl_settings_pmil') append
		
		* lfp
		ivreghdfe d_pmil_lau_lfp (d_pm25=d_hms_deep) [aw=seer_pop] , a(fe_countyqtroy fe_styr) cluster(countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_e3.dta", table(lfp, `tbl_settings_pmil') append
		
		preserve 
			use "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_e3.dta", clear
			drop if var == "r2"
			drop if var == "_id"
			drop if strpos(var, "_cons_") > 0
			replace var="observations" if var=="N"
			ingap 2
			ingap 5
			list , sep(0)
			saveold "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_e3.dta", replace
		restore 
		
	}
	
	** panel f, first row
	if 1 {
		
		* income 
		ivreghdfe d_pc_qwi_payroll (pm25=hms_deep) [aw=seer_pop], a(fe_countyqtroy fe_styr) cluster(countyfip fe_divisionqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_f1.dta", addlabel(KleibergenPaap_F, `e(rkf)') table(earnings, `tbl_settings_log') replace
		
		* emp 
		ivreghdfe d_pmil_qwi_emptotal (pm25=hms_deep) [aw=seer_pop16plus], a(fe_countyqtroy fe_styr) cluster(countyfip fe_divisionqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_f1.dta", table(employment, `tbl_settings_pmil') append
		
		* lfp
		ivreghdfe d_pmil_lau_lfp (pm25=hms_deep) [aw=seer_pop] , a(fe_countyqtroy fe_styr) cluster(countyfip fe_divisionqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_f1.dta", table(lfp, `tbl_settings_pmil') append
		
		preserve 
			use "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_f1.dta", clear
			drop if var == "r2"
			drop if var == "_id"
			drop if strpos(var, "_cons_") > 0
			replace var="observations" if var=="N"
			ingap 2
			ingap 5
			list , sep(0)
			saveold "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_f1.dta", replace
		restore 
		
	}
	
	** panel f, second row
	if 1 {
		
		* income 
		ivreghdfe d_pc_qwi_payroll (pm25=hms_deep) [aw=seer_pop], a(fe_countyqtroy fe_styr) cluster(countyfip fe_regionqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_f2.dta", addlabel(KleibergenPaap_F, `e(rkf)') table(earnings, `tbl_settings_log') replace
		
		* emp 
		ivreghdfe d_pmil_qwi_emptotal (pm25=hms_deep) [aw=seer_pop16plus], a(fe_countyqtroy fe_styr) cluster(countyfip fe_regionqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_f2.dta", table(employment, `tbl_settings_pmil') append
		
		* lfp
		ivreghdfe d_pmil_lau_lfp (pm25=hms_deep) [aw=seer_pop] , a(fe_countyqtroy fe_styr) cluster(countyfip fe_regionqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_f2.dta", table(lfp, `tbl_settings_pmil') append
		
		preserve 
			use "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_f2.dta", clear
			drop if var == "r2"
			drop if var == "_id"
			drop if strpos(var, "_cons_") > 0
			replace var="observations" if var=="N"
			ingap 2
			ingap 5
			list , sep(0)
			saveold "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_f2.dta", replace
		restore 
		
	}
	
	** panel f, third row
	if 1 {
		
		* income 
		ivreghdfe d_pc_qwi_payroll (pm25=hms_deep) [aw=seer_pop], a(fe_countyqtroy fe_styr) cluster(countyfip rfrnc_qtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_f3.dta", addlabel(KleibergenPaap_F, `e(rkf)') table(earnings, `tbl_settings_log') replace
		
		* emp 
		ivreghdfe d_pmil_qwi_emptotal (pm25=hms_deep) [aw=seer_pop16plus], a(fe_countyqtroy fe_styr) cluster(countyfip rfrnc_qtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_f3.dta", table(employment, `tbl_settings_pmil') append
		
		* lfp
		ivreghdfe d_pmil_lau_lfp (pm25=hms_deep) [aw=seer_pop] , a(fe_countyqtroy fe_styr) cluster(countyfip rfrnc_qtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_f3.dta", table(lfp, `tbl_settings_pmil') append
		
		preserve 
			use "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_f3.dta", clear
			drop if var == "r2"
			drop if var == "_id"
			drop if strpos(var, "_cons_") > 0
			replace var="observations" if var=="N"
			ingap 2
			ingap 5
			list , sep(0)
			saveold "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_f3.dta", replace
		restore 
		
	}
	
	** panel f, fourth row
	if 1 {
		
		* income 
		ivreghdfe d_pc_qwi_payroll (pm25=hms_deep) [aw=seer_pop], a(fe_countyqtroy fe_styr) cluster(countyfip)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_f4.dta", addlabel(KleibergenPaap_F, `e(rkf)') table(earnings, `tbl_settings_log') replace
		
		* emp 
		ivreghdfe d_pmil_qwi_emptotal (pm25=hms_deep) [aw=seer_pop16plus], a(fe_countyqtroy fe_styr) cluster(countyfip)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_f4.dta", table(employment, `tbl_settings_pmil') append
		
		* lfp
		ivreghdfe d_pmil_lau_lfp (pm25=hms_deep) [aw=seer_pop] , a(fe_countyqtroy fe_styr) cluster(countyfip)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_f4.dta", table(lfp, `tbl_settings_pmil') append
		
		preserve 
			use "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_f4.dta", clear
			drop if var == "r2"
			drop if var == "_id"
			drop if strpos(var, "_cons_") > 0
			replace var="observations" if var=="N"
			ingap 2
			ingap 5
			list , sep(0)
			saveold "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_f4.dta", replace
		restore 
		
	}
	
	** panel f, fifth row
	if 1 {
		
		* income 
		ivreghdfe d_pc_qwi_payroll (pm25=hms_deep) [aw=seer_pop], a(fe_countyqtroy fe_styr) cluster(statefip)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_f5.dta", addlabel(KleibergenPaap_F, `e(rkf)') table(earnings, `tbl_settings_log') replace
		
		* emp 
		ivreghdfe d_pmil_qwi_emptotal (pm25=hms_deep) [aw=seer_pop16plus], a(fe_countyqtroy fe_styr) cluster(statefip)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_f5.dta", table(employment, `tbl_settings_pmil') append
		
		* lfp
		ivreghdfe d_pmil_lau_lfp (pm25=hms_deep) [aw=seer_pop] , a(fe_countyqtroy fe_styr) cluster(statefip)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_f5.dta", table(lfp, `tbl_settings_pmil') append
		
		preserve 
			use "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_f5.dta", clear
			drop if var == "r2"
			drop if var == "_id"
			drop if strpos(var, "_cons_") > 0
			replace var="observations" if var=="N"
			ingap 2
			ingap 5
			list , sep(0)
			saveold "$Rep_smokelabor/2_analysis/output_tables/appendix_table2_f5.dta", replace
		restore 
		
	}
	
	
	
log close
